package thermologic.core;

import java.util.EventObject;

/**
 * Adapter related Event
 * 
 * @author Mauricio
 */
public abstract class AdapterEvent extends EventObject
{   
    /**
     * Builds an AdapterEvent with adapter
     * as source object
     * 
     * @param adapter
     */
    protected AdapterEvent(Adapter adapter)
    {
        super(adapter);
    }
    
    /**
     * @return an inmutable object of type adapter
     */
    public Adapter getAdapter()
    {
        final Adapter adapter = (Adapter)getSource();
        return adapter;
    }
    
    /**
     * @return a event message
     */
    public abstract String getEventMessage();
    
    public abstract String getEventCode();
}
